using System;
using Castle.ActiveRecord;
using CosyTrade.Data;

namespace CosyTrade.StoreManagement
{
    [AddPropertyChangedNotifyInterface, PropertyChangedNotify]
    [Serializable, ActiveRecord("tbProductCategory"), JoinedBase]
    public class ProductCategoryBase : BusinessObject
    {
        private readonly Guid primaryKey = Guid.NewGuid();
        private string categoryChinese;
        private string categorySpanish;
        private Guid parents;

        [PrimaryKey(PrimaryKeyType.Assigned, "ROWGUID", Access=PropertyAccess.NosetterCamelcase)]
        public Guid PrimaryKey
        {
            get { return primaryKey; }
        }

        [Property]
        public Guid Parent
        {
            get { return parents; }
            set { parents = value; }
        }

        [Property]
        public string CategoryChinese
        {
            get { return categoryChinese; }
            set { categoryChinese = value; }
        }

        [Property]
        public string CategorySpanish
        {
            get { return categorySpanish; }
            set { categorySpanish = value; }
        }
    }
}